package bus;

import java.util.List;

import dao.TitleDAO;
import dto.TitleDTO;

public class TitleBUS {
	public TitleDTO info = new TitleDTO();
	public TitleDAO data = new TitleDAO(null);
	
	public void setInfo(TitleDTO title) {
		this.info = title;
	}
	
	public TitleDTO getInfo() {
		return this.info;
	}
	
	public void addTitle() {
		data.addTitle(info);
	}
	
	public List<TitleDTO> getAllTitles(){
		return data.getAllTitles();
	}
	
	public boolean updateTitle(){
		return data.updateTitle(info);
	}
	
	public void deleteTitle(){
		data.deleteTitle(info);
	}
	
	public void deleteAllTitles(){
		data.deleteAllTitles();
	}
	
	public int getTitleCount(){
		return data.getTitleCount();
	}
}